package com.ebt.m.utils.android;

import android.util.Log;

/**
 * 
 * @ClassName: ProductVersionInfo
 * @author Damon.Han
 * @Description: 数据Bean类，展示产品的版本信息，产品下载时确定是否下载，及下载什么内�?方法注释�?
 * 
 *               IsResourceVersionChanged判断该产品的资源是否改变
 * @date 2013-12-25 下午4:19:50
 * 
 */
public class ProductVersionInfo {
	/* 公司id */
	private String compId;
	/* 产品id */
	private String productId;
	/* 服务器产品版本号 */
	private String productVersion_Server;
	/* 本地产品版本�?*/
	private String productVersion_Client;
	/* 服务器端资源版本�?*/
	private String resourceVersion_Server;
	/* 本地资源版本�?*/
	private String resourceVersion_Client;

	/**
	 * 
	 * @Description: 判断产品是否改变，包括数据的改变及资源的改变
	 * @param
	 * @return boolean
	 */
	public boolean isProductChanged() {
		if (!productVersion_Server.equals(productVersion_Client)
				|| !resourceVersion_Server.equals(resourceVersion_Client)) {
			return true;
		}
		return false;
	}

	/**
	 * 
	 * @Description: 判断产品的数据块是否改变
	 * @param
	 * @return boolean
	 * @throws
	 */
	public boolean isProductVersionChanged() {
		if (productVersion_Server != productVersion_Client) {
			return true;
		}
		return false;
	}

	/**
	 * 
	 * @Description: 判断该产品的资源是否改变
	 * @param
	 * @return boolean
	 * @throws
	 */
	public boolean isResourceVersionChanged() {
		
		if (resourceVersion_Server.equals(resourceVersion_Client)) {
			return false;
		}
		return true;
	}

	public String getCompId() {
		return compId;
	}

	public void setCompId(String compId) {
		this.compId = compId;
	}

	public String getProductId() {
		return productId;
	}

	public void setProductId(String productId) {
		this.productId = productId;
	}

	public String getProductVersion_Server() {
		return productVersion_Server;
	}

	public void setProductVersion_Server(String productVersion_Server) {
		this.productVersion_Server = productVersion_Server;
	}

	public String getProductVersion_Client() {
		return productVersion_Client;
	}

	public void setProductVersion_Client(String productVersion_Client) {
		this.productVersion_Client = productVersion_Client;
	}

	public String getResourceVersion_Server() {
		return resourceVersion_Server;
	}

	public void setResourceVersion_Server(String resourceVersion_Server) {
		this.resourceVersion_Server = resourceVersion_Server;
	}

	public String getResourceVersion_Client() {
		return resourceVersion_Client;
	}

	public void setResourceVersion_Client(String resourceVersion_Client) {
		this.resourceVersion_Client = resourceVersion_Client;
	}

}
